package cn.cloud.jianghai.orderapi.feign.fallback;

import cn.cloud.jianghai.jianghaicommon.entity.R;
import cn.cloud.jianghai.orderapi.entity.OrderDto;
import cn.cloud.jianghai.orderapi.feign.OrderApi;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Jiang.h
 * created 2022/5/21 17:35
 */
@Component
public class OrderFallback implements OrderApi {

    @Override
    public R<List<OrderDto>> findOrderList(List<Long> idList) {
        return R.fail("请求失败, 请稍后重试!");
    }

    @Override
    public R<Boolean> insertOrder(OrderDto orderDto) {
        return R.fail("创建订单失败, 请稍后再试");
    }

    @Override
    public R<List<OrderDto>> testHystrix(Long id) {
        return R.fail("请求失败, 请稍后重试!");
    }
}
